package com.sziit.se.highconcurrency.application.service.impl;

import com.sziit.se.highconcurrency.application.entity.User;
import com.sziit.se.highconcurrency.application.mapper.UserMapper;
import com.sziit.se.highconcurrency.application.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.netty.util.internal.StringUtil;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.UUID;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author dongchunkeng
 * @since 2022-09-21
 */
@Service
@AllArgsConstructor
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {
    private final UserMapper userMapper;

    @Override
    public List<User> getAllData() {
        return userMapper.getAllData();
    }

    @Override
    public Boolean insertUser(String userName, String phone) {
        String userId = UUID.randomUUID().toString();
        return userMapper.insertUser(userId, userName, phone);
    }
}
